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

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

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

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

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

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

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

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

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

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

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

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

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

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

b.r = e
b.u = k
b.x = m
a.v = b
h.u = d
f.s = b
f.q = b
f.y = h
f.u = e
d.s = h
d.z = h
d.v = a
d.u = i
j.x = d
j.q = i
j.w = i
j.y = k
j.u = b
k.v = b
e.s = b
e.q = b
e.y = h
e.u = f
m.v = b
i.x = d
i.q = j
i.w = j
i.y = a
i.u = b
assert i.y.v.u.v.r.y.u.txt == "d"