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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: A = None
        self.q: E = None
        self.txt = txt

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

c = A("c")
l = B("l")
d = C("d")
f = D("f")
j = E("j")
b = F("b")
k = G("k")
h = D("h")
i = C("i")

c.v = h
c.r = b
c.x = b
c.y = d
c.q = f
c.p = l
l.v = f
d.v = f
d.o = c
d.p = b
d.y = h
d.w = j
f.o = h
f.q = b
f.t = j
j.o = b
j.y = l
b.p = f
b.o = c
b.q = j
k.p = d
k.v = d
k.y = c
h.o = f
h.q = b
h.t = j
i.v = h
i.o = c
i.p = b
i.y = f
i.w = j
assert l.v.t.o.q.o.q.o.o.y.txt == "
class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.r: F = None
        self.y: C = None
        self.x: F = None
        self.q: D = None
        self.p: B = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: A = None
        self.q: E = None
        self.txt = txt

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

c = A("c")
l = B("l")
d = C("d")
f = D("f")
j = E("j")
b = F("b")
k = G("k")
h = D("h")
i = C("i")

c.v = h
c.r = b
c.x = b
c.y = d
c.q = f
c.p = l
l.v = f
d.v = f
d.o = c
d.p = b
d.y = h
d.w = j
f.o = h
f.q = b
f.t = j
j.o = b
j.y = l
b.p = f
b.o = c
b.q = j
k.p = d
k.v = d
k.y = c
h.o = f
h.q = b
h.t = j
i.v = h
i.o = c
i.p = b
i.y = f
i.w = j
assert l.v.t.o.q.o.q.o.o.y.txt == "d"