class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: F = None
        self.q: C = None
        self.x: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.q: C = None
        self.r: C = None
        self.z: C = None
        self.t: G = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: A = None
        self.s: E = None
        self.y: D = None
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: E = None
        self.u: B = None
        self.t: C = None
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.v: E = None
        self.q: C = None
        self.w: C = None
        self.r: G = None
        self.y: D = None
        self.s: A = None
        self.txt = txt

j = A("j")
b = B("b")
l = C("l")
h = D("h")
g = E("g")
n = F("n")
c = G("c")
i = G("i")

j.s = h
j.p = n
j.x = n
j.q = l
b.s = n
b.q = l
b.r = l
b.z = l
b.t = c
b.x = j
l.p = h
l.y = h
l.o = j
l.s = g
l.t = c
h.x = j
h.w = j
h.z = g
h.u = b
h.t = l
g.x = h
n.v = l
n.y = j
c.u = l
c.q = l
c.w = l
c.v = g
c.r = i
c.y = h
c.s = j
i.u = l
i.q = l
i.w = l
i.v = g
i.r = c
i.y = h
i.s = j
assert i.y.z.x.txt == "
class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: F = None
        self.q: C = None
        self.x: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.q: C = None
        self.r: C = None
        self.z: C = None
        self.t: G = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: A = None
        self.s: E = None
        self.y: D = None
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: E = None
        self.u: B = None
        self.t: C = None
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.v: E = None
        self.q: C = None
        self.w: C = None
        self.r: G = None
        self.y: D = None
        self.s: A = None
        self.txt = txt

j = A("j")
b = B("b")
l = C("l")
h = D("h")
g = E("g")
n = F("n")
c = G("c")
i = G("i")

j.s = h
j.p = n
j.x = n
j.q = l
b.s = n
b.q = l
b.r = l
b.z = l
b.t = c
b.x = j
l.p = h
l.y = h
l.o = j
l.s = g
l.t = c
h.x = j
h.w = j
h.z = g
h.u = b
h.t = l
g.x = h
n.v = l
n.y = j
c.u = l
c.q = l
c.w = l
c.v = g
c.r = i
c.y = h
c.s = j
i.u = l
i.q = l
i.w = l
i.v = g
i.r = c
i.y = h
i.s = j
assert i.y.z.x.txt == "h"