class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: E = None
        self.r: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.q: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.x: G = None
        self.w: H = None
        self.t: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: A = None
        self.s: G = None
        self.u: G = None
        self.x: D = None
        self.p: D = None
        self.t: B = None
        self.y: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.z: E = None
        self.q: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.q: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.x: G = None
        self.w: H = None
        self.t: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: A = None
        self.s: G = None
        self.u: G = None
        self.x: D = None
        self.p: D = None
        self.t: B = None
        self.y: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.z: E = None
        self.q: B = None
        self.txt = txt

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

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