class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.x: H = None
        self.t: E = None
        self.s: B = None
        self.o: A = None
        self.p: G = None
        self.q: E = None
        self.w: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: A = None
        self.t: C = None
        self.x: G = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: E = None
        self.y: F = None
        self.r: D = None
        self.w: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: D = None
        self.v: D = None
        self.p: C = None
        self.z: D = None
        self.u: G = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: A = None
        self.t: C = None
        self.x: G = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: E = None
        self.y: F = None
        self.r: D = None
        self.w: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: D = None
        self.v: D = None
        self.p: C = None
        self.z: D = None
        self.u: G = None
        self.txt = txt

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

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

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

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