class A:
    def __init__(self, txt: str):
        self.r: G = None
        self.u: H = None
        self.v: H = None
        self.y: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.q: H = None
        self.s: B = None
        self.p: E = None
        self.w: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.x: H = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: G = None
        self.y: G = None
        self.z: F = None
        self.s: H = None
        self.o: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.q: H = None
        self.s: B = None
        self.p: E = None
        self.w: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.x: H = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: G = None
        self.y: G = None
        self.z: F = None
        self.s: H = None
        self.o: B = None
        self.txt = txt

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

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