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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: A = None
        self.q: A = None
        self.u: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: C = None
        self.y: A = None
        self.x: C = None
        self.t: C = None
        self.v: E = None
        self.u: F = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: A = None
        self.q: A = None
        self.u: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: C = None
        self.y: A = None
        self.x: C = None
        self.t: C = None
        self.v: E = None
        self.u: F = None
        self.txt = txt

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

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