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

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

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

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

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

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

f = A("f")
c = B("c")
d = C("d")
a = D("a")
j = E("j")
e = F("e")
h = B("h")

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

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

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

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

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

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

f = A("f")
c = B("c")
d = C("d")
a = D("a")
j = E("j")
e = F("e")
h = B("h")

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