class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: G = None
        self.y: H = None
        self.u: F = None
        self.v: F = None
        self.w: H = None
        self.r: D = None
        self.o: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: G = None
        self.w: H = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: H = None
        self.z: C = None
        self.r: A = None
        self.v: H = None
        self.w: F = None
        self.s: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: D = None
        self.v: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: G = None
        self.w: H = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: H = None
        self.z: C = None
        self.r: A = None
        self.v: H = None
        self.w: F = None
        self.s: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: D = None
        self.v: A = None
        self.txt = txt

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

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