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

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

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

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: G = None
        self.r: A = None
        self.p: G = None
        self.z: C = None
        self.t: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: A = None
        self.s: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: G = None
        self.r: A = None
        self.p: G = None
        self.z: C = None
        self.t: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: A = None
        self.s: B = None
        self.txt = txt

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

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