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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: A = None
        self.p: F = None
        self.s: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: E = None
        self.x: E = None
        self.q: E = None
        self.txt = txt

h = A("h")
e = B("e")
m = C("m")
j = D("j")
d = E("d")
i = F("i")
c = B("c")
b = D("b")

h.t = j
h.x = i
h.z = c
e.s = m
e.u = c
m.v = d
m.r = e
m.p = b
j.q = h
j.r = h
j.z = h
j.s = d
j.o = m
j.x = i
d.z = j
d.o = h
d.p = i
d.s = b
i.w = d
i.t = d
i.x = d
i.q = d
c.s = m
c.u = e
b.q = h
b.r = h
b.z = h
b.s = d
b.o = m
b.x = i
assert c.s.p.o.r.s.v.txt == "
class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: F = None
        self.z: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: A = None
        self.p: F = None
        self.s: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: E = None
        self.x: E = None
        self.q: E = None
        self.txt = txt

h = A("h")
e = B("e")
m = C("m")
j = D("j")
d = E("d")
i = F("i")
c = B("c")
b = D("b")

h.t = j
h.x = i
h.z = c
e.s = m
e.u = c
m.v = d
m.r = e
m.p = b
j.q = h
j.r = h
j.z = h
j.s = d
j.o = m
j.x = i
d.z = j
d.o = h
d.p = i
d.s = b
i.w = d
i.t = d
i.x = d
i.q = d
c.s = m
c.u = e
b.q = h
b.r = h
b.z = h
b.s = d
b.o = m
b.x = i
assert c.s.p.o.r.s.v.txt == "d"