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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: F = None
        self.r: E = None
        self.p: C = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: F = None
        self.r: E = None
        self.p: C = None
        self.txt = txt

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

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

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

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