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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: D = None
        self.v: C = None
        self.t: B = None
        self.o: B = None
        self.w: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: B = None
        self.s: A = None
        self.w: A = None
        self.y: C = None
        self.u: A = None
        self.txt = txt

f = A("f")
a = B("a")
d = C("d")
h = D("h")
i = E("i")
n = F("n")
m = E("m")
b = C("b")
c = B("c")

f.t = h
f.r = c
a.u = h
a.s = h
a.w = h
a.v = d
a.t = c
a.o = c
d.s = n
h.t = f
h.o = f
h.x = m
h.s = n
i.w = h
i.y = n
n.q = i
n.o = a
n.s = f
n.w = f
n.u = f
n.y = b
m.w = h
m.y = n
b.s = n
c.u = h
c.s = h
c.w = h
c.v = d
c.t = a
c.o = a
assert b.s.o.o.v.txt == "
class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: D = None
        self.v: C = None
        self.t: B = None
        self.o: B = None
        self.w: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: B = None
        self.s: A = None
        self.w: A = None
        self.y: C = None
        self.u: A = None
        self.txt = txt

f = A("f")
a = B("a")
d = C("d")
h = D("h")
i = E("i")
n = F("n")
m = E("m")
b = C("b")
c = B("c")

f.t = h
f.r = c
a.u = h
a.s = h
a.w = h
a.v = d
a.t = c
a.o = c
d.s = n
h.t = f
h.o = f
h.x = m
h.s = n
i.w = h
i.y = n
n.q = i
n.o = a
n.s = f
n.w = f
n.u = f
n.y = b
m.w = h
m.y = n
b.s = n
c.u = h
c.s = h
c.w = h
c.v = d
c.t = a
c.o = a
assert b.s.o.o.v.txt == "d"