class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: F = None
        self.w: D = None
        self.o: F = None
        self.q: C = None
        self.s: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: A = None
        self.x: D = None
        self.txt = txt

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

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

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

h.t = e
h.r = b
h.o = b
h.w = n
h.q = f
h.s = m
k.o = g
k.w = h
f.v = a
f.u = n
f.x = b
n.o = g
n.p = h
n.x = i
a.x = f
g.v = f
g.s = e
m.o = g
m.w = h
e.x = f
i.o = g
i.p = h
i.x = n
b.v = f
b.s = a
assert e.x.u.o.v.x.txt == "
class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: F = None
        self.w: D = None
        self.o: F = None
        self.q: C = None
        self.s: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: A = None
        self.x: D = None
        self.txt = txt

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

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

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

h.t = e
h.r = b
h.o = b
h.w = n
h.q = f
h.s = m
k.o = g
k.w = h
f.v = a
f.u = n
f.x = b
n.o = g
n.p = h
n.x = i
a.x = f
g.v = f
g.s = e
m.o = g
m.w = h
e.x = f
i.o = g
i.p = h
i.x = n
b.v = f
b.s = a
assert e.x.u.o.v.x.txt == "b"