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

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

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.s: A = None
        self.u: F = None
        self.z: D = None
        self.q: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: E = None
        self.txt = txt

g = A("g")
b = B("b")
j = C("j")
h = D("h")
f = E("f")
n = F("n")
c = G("c")
k = F("k")
d = A("d")

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

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

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.s: A = None
        self.u: F = None
        self.z: D = None
        self.q: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: E = None
        self.txt = txt

g = A("g")
b = B("b")
j = C("j")
h = D("h")
f = E("f")
n = F("n")
c = G("c")
k = F("k")
d = A("d")

g.s = b
g.x = b
g.r = n
g.z = j
g.y = d
b.y = f
b.v = d
j.p = b
h.x = g
f.w = h
f.z = h
f.s = d
f.u = n
f.q = c
n.y = k
n.p = j
n.q = j
n.s = h
n.t = h
n.x = c
c.u = n
c.v = f
k.y = n
k.p = j
k.q = j
k.s = h
k.t = h
k.x = c
d.s = b
d.x = b
d.r = n
d.z = j
d.y = g
assert h.x.y.r.q.txt == "j"