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

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

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.y: H = None
        self.x: A = None
        self.z: F = None
        self.u: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: D = None
        self.r: D = None
        self.y: D = None
        self.u: C = None
        self.s: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: B = None
        self.y: C = None
        self.s: F = None
        self.r: A = None
        self.txt = txt

k = A("k")
h = B("h")
f = C("f")
c = D("c")
d = E("d")
g = F("g")
e = G("e")
i = H("i")
j = A("j")

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

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

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.y: H = None
        self.x: A = None
        self.z: F = None
        self.u: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: D = None
        self.r: D = None
        self.y: D = None
        self.u: C = None
        self.s: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: B = None
        self.y: C = None
        self.s: F = None
        self.r: A = None
        self.txt = txt

k = A("k")
h = B("h")
f = C("f")
c = D("c")
d = E("d")
g = F("g")
e = G("e")
i = H("i")
j = A("j")

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