class A:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: F = None
        self.o: E = None
        self.r: D = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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