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

class B:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: C = None
        self.v: E = None
        self.o: E = None
        self.y: B = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: E = None
        self.r: C = None
        self.s: C = None
        self.txt = txt

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

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

l = A("l")
f = B("f")
c = C("c")
g = D("g")
d = E("d")
h = F("h")
b = B("b")
m = C("m")
j = C("j")

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

class B:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: C = None
        self.v: E = None
        self.o: E = None
        self.y: B = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: E = None
        self.r: C = None
        self.s: C = None
        self.txt = txt

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

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

l = A("l")
f = B("f")
c = C("c")
g = D("g")
d = E("d")
h = F("h")
b = B("b")
m = C("m")
j = C("j")

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