class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: E = None
        self.t: A = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: E = None
        self.r: G = None
        self.p: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: A = None
        self.z: H = None
        self.t: H = None
        self.o: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: C = None
        self.p: H = None
        self.x: H = None
        self.q: A = None
        self.r: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

e = A("e")
b = B("b")
g = C("g")
c = D("c")
k = E("k")
a = F("a")
d = G("d")
j = H("j")
m = F("m")
f = A("f")

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

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

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: E = None
        self.r: G = None
        self.p: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: A = None
        self.z: H = None
        self.t: H = None
        self.o: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: C = None
        self.p: H = None
        self.x: H = None
        self.q: A = None
        self.r: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

e = A("e")
b = B("b")
g = C("g")
c = D("c")
k = E("k")
a = F("a")
d = G("d")
j = H("j")
m = F("m")
f = A("f")

e.w = m
e.u = k
e.t = f
b.u = f
b.o = j
b.r = c
b.s = d
b.x = k
b.v = k
b.t = m
b.q = g
g.v = j
c.o = b
c.t = k
c.r = d
c.p = j
k.x = j
k.z = j
k.t = j
k.o = j
k.q = f
a.t = k
a.z = g
a.p = j
a.x = j
a.q = e
a.r = f
d.o = b
d.z = a
j.s = a
m.t = k
m.z = g
m.p = j
m.x = j
m.q = e
m.r = e
f.w = a
f.u = k
f.t = e
assert f.w.r.t.t.t.w.txt == "m"